package com.iqiyi.pps.epg.core.dao.ticket;

import com.iqiyi.pps.epg.api.model.web.ticket.TTicketLiveCheck;
import com.iqiyi.pps.epg.core.dao.base.BaseDao;
import com.iqiyi.pps.epg.core.model.ticket.TicketLiveCheck;
import com.iqiyi.pps.epg.core.utils.DateTimeUtil;
import org.springframework.stereotype.Component;

/**
 * Created by karkarrotxu on 2017/9/11.
 */
@Component
public class TicketLiveCheckDao extends BaseDao<TicketLiveCheck> {
    public TTicketLiveCheck transToThrift(TicketLiveCheck tempData) {
        if (tempData == null) {
            return null;
        }
        TTicketLiveCheck entity = new TTicketLiveCheck();
        entity.setId(tempData.getId());
        entity.setDataId(tempData.getDataId());
        entity.setType(tempData.getType());
        entity.setUser(tempData.getOpUser());
        entity.setDetail(tempData.getDetail());
        entity.setAddTime(DateTimeUtil.transLongFormat(tempData.getAddTime().getTime()));
        entity.setUpdateTime(DateTimeUtil.transLongFormat(tempData.getUpdateTime().getTime()));
        return entity;
    }
}